<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>解决移动端点击延时</title>
		<!--使用步骤1 引入fastclick文件-->
		<script src="js/fastclick.js"></script>
	</head>
	<body>
		<div>点我</div>
		<script type="text/javascript">
			//使用步骤2 引入代码
			if ('addEventListener' in document) {
				document.addEventListener('DOMContentLoaded', function() {
					FastClick.attach(document.body);
				}, false);
			}
			
			//使用 
			var div = document.querySelector('div');
			div.addEventListener('click',function() {
				alert(1)
			})
		</script>
	</body>
</html>
